package vos.vn;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.TextView;

public class HalalActivity extends Activity implements OnClickListener{
    private TextView restaurantsLink;
    private TextView mapLink;
    private TextView newPromLink;
    private TextView aboutLink;
    private Intent intent;
    
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.home);
        
        restaurantsLink = (TextView) findViewById(R.id.home_lblRestaurants);
        restaurantsLink.setOnClickListener(this);
        mapLink = (TextView) findViewById(R.id.home_lblMaps);
        mapLink.setOnClickListener(this);
        newPromLink = (TextView) findViewById(R.id.home_lblNewProm);
        newPromLink.setOnClickListener(this);
        aboutLink = (TextView) findViewById(R.id.home_lblAbout);        
        aboutLink.setOnClickListener(this);        
    }
    
	@Override
	public void onClick(View v) {		
		switch(v.getId()) {
			case R.id.home_lblRestaurants:
				intent = new Intent(v.getContext(), Restaurants.class);
				startActivityForResult(intent, 0);
				break;
			case R.id.home_lblMaps:
				intent = new Intent(v.getContext(), Map.class);
				startActivityForResult(intent, 0);
				break;			
			case R.id.home_lblAbout:
				intent = new Intent(v.getContext(), About.class);
				startActivityForResult(intent, 0);
				break;
			case R.id.home_lblNewProm:
				intent = new Intent(v.getContext(), NewsPromotion.class);
				startActivityForResult(intent, 0);
				break;	
			default:
				break;
		}
	}
}